package com.uzai.console.enums;


import com.uzai.console.constant.CacheKey;

/**
 * @author liuqi
 * @date 2019-04-03 14:18
 */
public enum SmsType {
    REGISTER(1, CacheKey.REGISTER_SMS_CODE,"SMS_136005085"),
    LOGIN(2, CacheKey.LOGIN_SMS_CODE,"SMS_136005087"),
    PASSWORD(3, CacheKey.CHANGE_PWD_SMS_CODE,"SMS_136005084"),
    WX_PAY_RECHARGE(4, CacheKey.WX_PAY_RECHARGE,"SMS_136005088"),
    SPECIAL_OPERATE(5, CacheKey.SPECIAL_OPERATE,"SMS_231442104"),
    CMSTYPE_WXCONTACTS_WXID(6, CacheKey.CMSTYPE_WXCONTACTS_WXID,"SMS_231442104"), //个人微信通讯录显示wxid
    CMSTYPE_WECHATUSER_WXID(7, CacheKey.CMSTYPE_WECHATUSER_WXID,"SMS_231442104"),//个人微信会员详情显示wxid
    DATA_HANDLE_CLEAN_WITHDRAW_RECORD(8, CacheKey.DATA_HANDLE_CLEAN_WITHDRAW_RECORD,"SMS_231442104"),//数据处理-提现数据清理
    CLEAN_LOGIN_LOGS(9, CacheKey.CLEAN_LOGIN_LOGS,"SMS_231442104"),//清空登录日志
    CMSTYPE_REQUESTUSERS_WXID(10, CacheKey.CMSTYPE_REQUESTUSERS_WXID,"SMS_231442104"), //个人微信好友请求列表显示wxid
    USER_DATA_HANDER(11, CacheKey.USER_DATA_HANDER,"SMS_231442104"), //会员数据处理
    USER_DATA_DELETE(12, CacheKey.USER_DATA_HANDER,"SMS_231442104"), //会员数据删除
    CMSTYPE_GROUP_MEMBER_WXID(13, CacheKey.CMSTYPE_GROUP_MEMBER_WXID,"SMS_231442104"), //微信群成员请求列表显示wxid
    ALARM_EVENT_UPDATE(14, CacheKey.ALARM_EVENT_UPDATE,"SMS_231442104"), //事件报警配置数据修改
    CMSTYPE_TAKEBAL_ALIPAY(15, CacheKey.CMSTYPE_TAKEBAL_ALIPAY,"SMS_231442104"), //提现列表显示支付宝信息
    CMSTYPE_BAlANCE_TAKE(-16, CacheKey.CMSTYPE_BAlANCE_TAKE,"SMS_231442104"), //账户余额提现(type为负，表示不扣费)
    ORDER_DATA_DELETE(17, CacheKey.ORDER_DATA_DELETE,"SMS_231442104"), //订单数据删除
    AMOY_GOLD_APP_SECRET(18, CacheKey.AMOY_GOLD_APP_SECRET,"SMS_231442104"), //淘礼金appsec
    CMSTYPE_USER_MOBILE(19, CacheKey.CMSTYPE_USER_MOBILE,"SMS_231442104"), //会员mobile
    CMSTYPE_MERCHANT_AUTHENTICATION(20, CacheKey.CMSTYPE_MERCHANT_AUTHENTICATION,"SMS_464746020"), //实名认证(专有的实名验证短信模板消息，不通用)
    CONFIG_SMS_CODE(21, CacheKey.CONFIG_SMS_CODE,"SMS_231442104"), //短信验证配置
    UPDATE_USER_BALANCE_INTEGRAL(22, CacheKey.UPDATE_USER_BALANCE_INTEGRAL,"SMS_231442104"), //修改会员积分余额

    ;
    private Integer value;
    private String desc;
    private String tempId;
    SmsType(Integer value, String desc, String tempId) {
        this.value = value;
        this.desc = desc;
        this.tempId = tempId;
    }
    public Integer getValue() {
        return value;
    }
    public String getDesc() {
        return desc;
    }
    public String getTempId(){
        return tempId;
    }
    public static SmsType getValue(Integer value) {
        if (value == null) {
            return null;
        }
        for (SmsType userType: SmsType.values()) {
            if (userType.getValue() == value) {
                return userType;
            }
        }
        return null;
    }
    public static String getDesc(Integer value) {
        if(getValue(value) == null){
            return null;
        }
        return getValue(value).getDesc();
    }
}
